<?php
include "includeFiles.php";
if(empty($_SESSION['user_id'])) echo "<script>location.href='login.php';</script>";
include "page.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $C['Title'];?></title>
<Link href="../uploadfile/ico/<?php echo $C['ICO'];?>" rel="Shortcut Icon">
<meta name="Keywords" content="<?php echo $C['Keywords'];?>">
<meta name="description" content="<?php echo $C['Description'];?>">
<Meta name="Copyright" Content="<?php echo $C['CopyRight'];?>">
<link href="css/css.css" rel="stylesheet" type="text/css" />
<link charset="utf-8" rel="stylesheet" href="css/alipay.css">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
</head>
<body id="mainbody">
<?php include_once('header.php');?>
<!--主体布局-->
<div class="main">
  <div class="locahostDIv"> <span>当前位置：<a href="index.php?cityid=<?=$cityid?>">首页</a></span> >
  <?
   if($keyword)	{ echo "搜索中"; }else{
  
  ?>
   <a href="on.php?hid=110&cityid=<?=$cityid?>">2G号码套包</a> > <a href="on.php?cateid=<?=$cateid?>&cityid=<?=$cityid?>"><?=$alink=$info->getProLinks($cateid)?></a> 
   <? }?>
   
   </div>
  <div class="contant">
    <div class="left">
      <div class="fen">
        <div class="box">
          <div class="tital">
            <div class="tit"><em>产品分类</em></div>
          </div>
          <div class="main2">
            <div class="sorttab">
              <ul class="tab">
	<?php	
	$vm=$info->getProMenu(110);
	if($vm){
	foreach($vm as $key=>$value){
	 ?>
        <li class="l1"><a href="on.php?cateid=<?=$value['SysProCategoryID']?>&cityid=<?=$cityid?>"><?=$value['CateName']?></a></li>
            <? }}?>
              </ul>
            </div>
          </div>
        </div>
        <div class="bot"></div>
      </div>
    </div>
    <div class="right">
      <div class="about2">
        <div class="box">
          <div class="main1">
              <div class="pageInfo">
                <ul class="thumbnails three-columns landing">
                <?php
				if($keyword)
				{
					$condition=" and ProductName like '%$keyword%' ";
					echo "搜索有关'<span style=\"color:#FF0000\">".$keyword."'</span>的关键字";
				}
				else if($cateid)
				{
					$condition=" and CateID='$cateid' ";
				}
				else if($hid)
				{
					$condition=" and CateID like '$hid%' ";
				}
				
			    $SQL="SELECT * FROM `hy_b_sys_products`  where 1 $condition and num > 0  and CityID = '".$cityid."'  ";
				$result=mysql_query($SQL);
				$total=mysql_num_rows($result);
				//调用pageft()，每页显示10条信息（使用默认的20时，可以省略此参数），使用本页URL（默认，所以省略掉）。
				_PAGEFT($total,6);
				if($total==0) echo "<h3>对不起！没有相关资料</h3>";
				   $SQL2= $SQL."   order by `SortNum` asc,`SysProductsID`  desc limit $firstcount,$displaypg  ";
				$result=mysql_query($SQL2);
				while($value=mysql_fetch_array($result)){
				?>
				  <li > <a href="?action=addcart&prid=<?=$value['SysProductsID']?>&cityid=<?=$cityid?>" onmouseover="viewallnum(<?=$value['SysProductsID']?>)">
                    <div class="thumbnail">
                      <div style="top: 149px; width:738px;" class="text">
                        <div class="text-header">
                          <h4> <span><?=$value['ProductName']?></span>
                         ￥<?=$value['Price']?>
                           </h4>
                        </div>
                        
                         <p style="width:342px;word-break:break-all; margin-top:-28px; margin-left:-9px; line-height:12px; color:#FFF" id="allnum<?=$value['SysProductsID']?>"> &nbsp;<br/>
                         <?   echo $note = $value['Note'];
					?>
                           </p>
                      </div>
                      <img class="photo" alt="<?=$value['ProductName']?>" src="admin/pic.php?imagename=../uploadfile/product_b/<?=$value['Photos1']?>&amp;imagewidth=339&amp;imageheight=205&amp;cuteit=0" 
					   onerror="javascript:this.src='images/1.jpg'"  
					  /> <span class="shadow"></span> </div>
                  </a> </li>
            <? }?>
                </ul>
              </div>            
            <script type="text/javascript" src="js/jquery.min.js"></script>
            <script type="text/javascript" src="js/plugins.js"></script>
            <script type="text/javascript" src="js/script.js"></script>
          
          </div>
        </div>
		<div align="center" style="font-size:16px; width:700px;"> <?php echo $pagenav; ?></div>
        <div class="bot"></div>
      </div>
    </div>
  </div>
  <div class="gehang"></div>
  <div style="width:980px;height:100%;overflow:hidden;margin-top:10px"> <img src="images/copy_line.jpg" /><br />
    <br />
    <br />
    <img src="images/copy.jpg" />
    <?php include_once('help.php');?>
    <img src="images/copy_line.jpg" /> </div>
</div>
<div class="clear"></div>
<?php include_once('footer.php');?>

</body>
</html>
